package com.yuxh.blog.controller;

import com.yuxh.blog.contact.BaseJsonResult;
import com.yuxh.blog.model.Timeline;
import com.yuxh.blog.service.TimelineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/timeline")
public class TimelineController {

    @Autowired
    private TimelineService timelineService;

    @RequestMapping("/list")
    public BaseJsonResult list() {
        List<Timeline> list = timelineService.list();
        return BaseJsonResult.success("list", list);
    }

}
